CC=gcc
CFLAGS= -g -Wall -std=c99
CPP=g++
CPPFLAGS= -g3 -Wall -lpthread -D_ONLY_ENGINE_DEBUG_ -shared -fpic

PINYINIME_DICTBUILDER=googleime.so

LIBRARY_SRC= \
	./share/dictbuilder.cpp \
	./share/dictlist.cpp \
	./share/dicttrie.cpp \
	./share/lpicache.cpp \
	./share/matrixsearch.cpp \
	./share/mystdlib.cpp \
	./share/ngram.cpp \
	./share/pinyinime.cpp \
	./share/searchutility.cpp \
	./share/spellingtable.cpp \
	./share/spellingtrie.cpp \
	./share/keymapping.cpp \
	./share/splparser.cpp \
	./share/userdict.cpp \
	./share/utf16char.cpp \
	./share/utf16reader.cpp \
	./share/sync.cpp \
	./wrapper.cpp

all: engine

engine: $(PINYINIME_DICTBUILDER)

$(PINYINIME_DICTBUILDER): $(LIBRARY_SRC)
	@$(CPP) $(CPPFLAGS) -o $@ $?


clean:
	-rm -rf $(PINYINIME_DICTBUILDER)

.PHONY: clean
